import React from 'react'

module.exports = [
  {
  	key: 'id',
    title: '编号',
    dataType: 'int',
    primary: true,
  },
  {
    key: 'title',
    title: '标题',
    dataType: 'varchar',
  },
  {
    key: 'alias',
    title: '别名',
    dataType: 'varchar',
  },
  {
    key: 'status',
    title: '状态',
    dataType: 'varchar',
    render: (text) => {
      if(text == 1){
        return "上线";
      }
      else if (text == 2){
        return "草稿";
      }
    }
  },
  {
    key: 'createdAtStr',
    title: '创建时间',
    dataType: 'varchar',
  },
  {
    key: 'editId',
    title: '操作',
    dataType: 'varchar',
    
    render: (text, record, index ) => {
      const { catId } = record;
      const url = `/cms/manage/index#/cms/manage/ArticleManage/articleEdit?id=${text}&catId=${catId}`;
      return <a href={url}>编辑</a>
    }
  }
];
